<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>内存泄露</title>
    <script src="../../assets/libs/jquery-2.0.3.js"></script>
</head>
<body>
    <script>
        //1
        var obj = {};
        $.data(obj, 'name', 'aaron');
        console.log($.data(obj, 'name')) 
        console.log(obj) 

        //2
        var obj2 = {};
        $.data(obj2, {
            name1: 'aaron1'
        });
        console.log($.data(obj2))
        console.log('obj2 :>> ', obj2);

        //3
        var $body = $("body")
        $body.data("foo", 52);
        console.log($body.data('foo'))
        console.log($body)
    </script>
</body>
</html>